package cn.cs.mapper;

import cn.cs.pojo.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface AppOrderMapper {
    AppOrder getAppOrderById(String appId);

    String getParentFaultType(String fault_category);

    int updateAppOrderState(Map<String, Object> map);

    List<AppOrder> getAllAppOrders(Map<String, Object> param);

    List<AfterOrder> getAllAfterOrders(String s);

    int updateAppOrder(AppOrder appOrder);

    String getUserFullAddressByid(String userAddressId);



    public Map<String,Object> getAppOrderByAppOrderId(@Param(value = "id") String id)throws Exception;

    public List<Map<String,Object>>	getAppOrderListByMap(Map<String, Object> param)throws Exception;

    public Integer getAppOrderCountByMap(Map<String, Object> param)throws Exception;

    public Integer insertAppOrder(AppOrder appOrder)throws Exception;

    public Integer deleteAppOrderById(@Param(value = "id") Long id)throws Exception;

    public  void toRepairOrder(RepOrder repOrder) throws Exception;

    public List<Map<String,Object>> getAppsByRepId(String id);

    public Integer updateAppOrderMap(Map<String, Object> appOrder);

    public List<UserAddress> getUserAddressListById(Map<String, Object> param)throws Exception;

    public Integer insertUserAddress(UserAddress userAddress)throws Exception;

    public Integer updateClientUser(ClientUser clientUser)throws Exception;

    public List<ClientRepRel>	getClientRepRelListByMap(Map<String, Object> param)throws Exception;

    public Map<String,Object> getRepairUserInfoById(String repUserId)throws Exception;

    public List<Map<String,Object>>	getRepairUserArea(@Param(value = "id") String id);

    public RepairUser getRepairUserById(@Param(value = "id") Long id)throws Exception;

    public List<Map<String,Object>> getRepairUserByAreaId(@Param(value = "area") String area)throws Exception;

    public Map<String,Object> getRepairUserAddressByAreaId(@Param(value = "repairUserId") String repairUserId, @Param(value = "area") String area)throws Exception;

    public List<Map<String, Object>> getOverTimeAppOrderList();

    public Map<String,Object> getRepOrderByAppId(String appId);

    public List<Map<String, Object>> getCourierServices();

    public Integer saveCourierServices(@Param(value = "courierCompany") String courierCompany,@Param(value = "courierNumber") String courierNumber,@Param(value = "id") String id);

    public Map<String, String> getAreaIdByOrderId(@Param(value = "orderId") String orderId);

    public List<Map<String, Object>> getRepairUserDayByMap(Map<String, Object> param);

    public Integer getRepairUserDayByMapCount(Map<String, Object> param);

    public Integer userRepairApplyOrder(AppOrder appOrder)throws Exception;
}
